/*    */ package com.qmsk.business.member.questionnaire.bean;
/*    */ 
/*    */ import com.utils.gson.out.GsonEbRstData;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ 
/*    */ public class GsonEbRstListData
/*    */ {
/*    */   private List<String> heads;
/*    */   private List<List<Object>> datas;
/*    */   private Long len;
/*    */   private GsonEbRstData rstData;
/*    */ 
/*    */   public GsonEbRstListData(GsonEbRstData gsonEbRstData)
/*    */   {
/* 15 */     this.rstData = gsonEbRstData;
/* 16 */     if (gsonEbRstData == null) {
/* 17 */       this.heads = new ArrayList();
/* 18 */       this.datas = new ArrayList();
/* 19 */       this.len = Long.valueOf(0L);
/* 20 */       return;
/*    */     }
/*    */ 
/* 23 */     String[] head = gsonEbRstData.getHead();
/* 24 */     List list = gsonEbRstData.getData();
/*    */ 
/* 26 */     ArrayList tempHeads = new ArrayList();
/*    */ 
/* 28 */     for (int i = 0; i < head.length; ++i) {
/* 29 */       tempHeads.add(head[i]);
/*    */     }
/*    */ 
/* 32 */     this.heads = tempHeads;
/* 33 */     this.datas = new ArrayList();
/* 34 */     for (int i = 0; i < list.size(); ++i) {
/* 35 */       ArrayList dataTemp = new ArrayList();
/* 36 */       Object[] temp = (Object[])list.get(i);
/* 37 */       for (int j = 0; j < temp.length; ++j) {
/* 38 */         dataTemp.add(temp[j]);
/*    */       }
/* 40 */       this.datas.add(dataTemp);
/*    */     }
/* 42 */     this.len = gsonEbRstData.getLen();
/*    */   }
/*    */ 
/*    */   public GsonEbRstData toGsonEbRstData() {
/* 46 */     this.rstData.setHead((String[])getHeads().toArray(new String[0]));
/* 47 */     List data = new ArrayList();
/* 48 */     for (int i = 0; i < getDatas().size(); ++i) {
/* 49 */       data.add(((List)getDatas().get(i)).toArray());
/*    */     }
/* 51 */     this.rstData.setData(data);
/* 52 */     return this.rstData;
/*    */   }
/*    */ 
/*    */   public List<Object> getRow(int row) {
/* 56 */     if ((row >= this.len.longValue()) || (row < 0))
/* 57 */       return null;
/* 58 */     return ((List)this.datas.get(row));
/*    */   }
/*    */ 
/*    */   public List<String> getHeads() {
/* 62 */     return this.heads;
/*    */   }
/*    */ 
/*    */   public void setHeads(List<String> heads) {
/* 66 */     this.heads = heads;
/*    */   }
/*    */ 
/*    */   public List<List<Object>> getDatas() {
/* 70 */     return this.datas;
/*    */   }
/*    */ 
/*    */   public void setDatas(List<List<Object>> datas) {
/* 74 */     this.datas = datas;
/*    */   }
/*    */ 
/*    */   public Long getLen() {
/* 78 */     return this.len;
/*    */   }
/*    */ 
/*    */   public void setLen(Long len) {
/* 82 */     this.len = len;
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.questionnaire.bean.GsonEbRstListData
 * JD-Core Version:    0.5.3
 */